<!-- 继承公共视图文件 -->
<extend name="./Application/Admin/View/layout.html" />
 <!-- 可变内容区域 -->
<block name="mid">

  <div class="layui-row">
      <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px; margin-bottom: 0; float: left;" >
      <h2><i class="fa fa-indent red"></i><strong>&nbsp;&nbsp;规格列表</strong></h2>
    </fieldset>

      <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px; margin-bottom: 0; float: right;" >
          <a href="{:U('Admin/spec/add')}" class="layui-btn layui-btn-primary" style="padding-right:12px;"><i class="fa fa-plus"></i>&nbsp;添加规格</a>
    </fieldset>
  </div>
  <hr class="layui-bg-black">

  <div class="layui-row"  >
      <div class="layui-col-sm12">
          <table class="layui-table">
              <thead>
                  <tr>
                    <th width="50">ID</th>
                    <th>规格名称</th>
                    <th>商品类型</th>
                    <th>操作</th>
                </tr>
            </thead>
              <tbody>
                <foreach name="list" key="k" item="v" >
                  <tr>
                      <td>{$v.id}</td>
                      <td>{$v.spec_name}</td>
                      <td>{$v.goods_type.name}</td>
                      <td>
                          <a class="btn btn-success" href="{:U('Admin/spec_item/lists/spec_id/'.$v['id'])}">
                            <i class="fa fa-search-plus "></i>
                          </a>
                          <a class="btn btn-info" href="{:U('Admin/admin/edit/id/'.$v['id'])}">
                            <i class="fa fa-edit "></i>
                          </a>
                          <a class="btn btn-danger" href="{:U('Admin/admin/del/id/'.$v['id'])}">
                            <i class="fa fa-trash-o "></i>
                          </a>
                      </td>
                  </tr>
                </foreach>
              </tbody>
          </table>
      </div>
  </div>



</block>